home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games Extra 1996 September / Amiga Games Extra CD-ROM 9-1996.iso / userbox / publicdomain / vim-4.2 / src / option.h < prev    next >
C/C++ Source or Header  |  1996-06-11  |  10KB  |  247 lines

  1. /* vi:set ts=4 sw=4:
  2.  *
  3.  * VIM - Vi IMproved        by Bram Moolenaar
  4.  *
  5.  * Do ":help uganda"  in Vim to read copying and usage conditions.
  6.  * Do ":help credits" in Vim to see a list of people who contributed.
  7.  */
  8.  
  9. /*
  10.  * option.h: definition of global variables for settable options
  11.  *
  12.  * EXTERN is only defined in main.c (and vim.h)
  13.  */
  14.  
  15. #ifndef EXTERN
  16. # define EXTERN extern
  17. # define INIT(x)
  18. #else
  19. # ifndef INIT
  20. #  define INIT(x) x
  21. # endif
  22. #endif
  23.  
  24. /* Formatting options for the p_fo option: */
  25. #define FO_WRAP            't'
  26. #define FO_WRAP_COMS    'c'
  27. #define FO_RET_COMS        'r'
  28. #define FO_OPEN_COMS    'o'
  29. #define FO_Q_COMS        'q'
  30. #define FO_Q_SECOND        '2'
  31. #define FO_INS_VI        'v'
  32. #define FO_INS_LONG        'l'
  33. #define FO_INS_BLANK    'b'
  34.  
  35. #define FO_DFLT_VI        "vt"
  36. #define FO_DFLT            "tcq"
  37. #define FO_ALL            "tcroq2vlb,"    /* for do_set() */
  38.  
  39. /* characters for the p_cpo option: */
  40. #define CPO_BAR            'b'        /* "\|" ends a mapping */
  41. #define CPO_BSLASH        'B'        /* backslash in mapping is not special */
  42. #define CPO_SEARCH        'c'
  43. #define CPO_EXECBUF        'e'
  44. #define CPO_FNAMER        'f'        /* set file name for ":r file" */
  45. #define CPO_FNAMEW        'F'        /* set file name for ":w file" */
  46. #define CPO_KEYCODE        'k'        /* don't recognize raw key code in mappings */
  47. #define CPO_SHOWMATCH    'm'
  48. #define CPO_LINEOFF        'o'
  49. #define CPO_REDO        'r'
  50. #define CPO_BUFOPT        's'
  51. #define CPO_BUFOPTGLOB    'S'
  52. #define CPO_TAGPAT        't'
  53. #define CPO_ESC            'x'
  54. #define CPO_DOLLAR        '$'
  55. #define CPO_FILTER        '!'
  56. #define CPO_MATCH        '%'
  57. #define CPO_SPECI        '<'        /* don't recognize <> in mappings */
  58. #define CPO_DEFAULT        "BceFs"
  59. #define CPO_ALL            "bBcefFkmorsStx$!%<"
  60.  
  61. /* characters for p_ww option: */
  62. #define WW_ALL            "bshl<>[],"
  63.  
  64. /* characters for p_mouse option: */
  65. #define MOUSE_NORMAL    'n'                /* use mouse in normal mode */
  66. #define MOUSE_VISUAL    'v'                /* use mouse in visual mode */
  67. #define MOUSE_INSERT    'i'                /* use mouse in insert mode */
  68. #define MOUSE_COMMAND    'c'                /* use mouse in command line mode */
  69. #define MOUSE_HELP        'h'                /* use mouse in help buffers */
  70. #define MOUSE_RETURN    'r'                /* use mouse for hit-return message */
  71. #define MOUSE_A            "nvich"            /* used for 'a' flag */
  72. #define MOUSE_ALL        "anvicrh"        /* all possible characters */
  73.  
  74. /* characters for p_shm option: */
  75. #define SHM_RO            'r'            /* readonly */
  76. #define SHM_MOD            'm'            /* modified */
  77. #define SHM_FILE        'f'            /* (file 1 of 2) */
  78. #define SHM_LAST        'i'            /* last line incomplete */
  79. #define SHM_TEXT        'x'            /* tx instead of textmode */
  80. #define SHM_LINES        'l'            /* "L" instead of "lines" */
  81. #define SHM_NEW            'n'            /* "[New]" instead of "[New file]" */
  82. #define SHM_WRI            'w'            /* "[w]" instead of "written" */
  83. #define SHM_A            "rmfixlnw"    /* represented by 'a' flag */
  84. #define SHM_WRITE        'W'            /* don't use "written" at all */
  85. #define SHM_TRUNC        't'            /* trunctate message */
  86. #define SHM_OVER        'o'            /* overwrite file messages */
  87. #define SHM_SEARCH        's'            /* no search hit bottom messages */
  88. #define SHM_ALL            "rmfixlnwaWtos"    /* all possible flags for 'shm' */
  89.  
  90. /* characters for p_guioptions: */
  91. #define GO_ASEL            'a'            /* GUI: autoselect */
  92. #define GO_BOT            'b'            /* GUI: use bottom scrollbar */
  93. #define GO_FORG            'f'            /* GUI: start GUI in foreground */
  94. #define GO_GREY            'g'            /* GUI: use grey menu items */
  95. #define GO_LEFT            'l'            /* GUI: use left scrollbar */
  96. #define GO_MENUS        'm'            /* GUI: use menu bar */
  97. #define GO_RIGHT        'r'            /* GUI: use right scrollbar */
  98. #define GO_ALL            "abfglmr"    /* all possible flags for 'go' */
  99.  
  100. /* flags for 'comments' option */
  101. #define COM_NEST        'n'            /* comments strings nest */
  102. #define COM_BLANK        'b'            /* needs blank after string */
  103. #define COM_START        's'            /* start of comment */
  104. #define COM_MIDDLE        'm'            /* middle of comment */
  105. #define COM_END            'e'            /* end of comment */
  106. #define COM_FIRST        'f'            /* first line comment only */
  107. #define COM_LEFT        'l'            /* left adjusted */
  108. #define COM_RIGHT        'r'            /* right adjusted */
  109. #define COM_ALL            "nbsmeflr"    /* all flags for 'comments' option */
  110. #define COM_MAX_LEN        50            /* maximum lenght of a part */
  111.  
  112. /*
  113.  * The following are actual variabables for the options
  114.  */
  115.  
  116. #ifdef RIGHTLEFT
  117. EXTERN int        p_aleph;    /* Hebrew 'Aleph' encoding */
  118. #endif
  119. EXTERN int        p_aw;        /* auto-write */
  120. EXTERN long        p_bs;        /* backspace over newlines in insert mode */
  121. EXTERN int        p_bk;        /* make backups when writing out files */
  122. EXTERN char_u  *p_bdir;        /* list of directory names for backup files */
  123. EXTERN char_u  *p_bex;        /* extension for backup file */
  124. #ifdef MSDOS
  125. EXTERN int        p_biosk;    /* Use bioskey() instead of kbhit() */
  126. #endif
  127. EXTERN char_u  *p_breakat;    /* characters that can cause a line break */
  128. EXTERN long        p_ch;        /* command line height */
  129. EXTERN int        p_cp;        /* vi-compatible */
  130. EXTERN char_u  *p_cpo;        /* vi-compatible option flags */
  131. EXTERN char_u  *p_def;        /* Pattern for recognising definitions */
  132. EXTERN char_u  *p_dict;        /* Dictionaries for ^P/^N */
  133. #ifdef DIGRAPHS
  134. EXTERN int        p_dg;        /* enable digraphs */
  135. #endif /* DIGRAPHS */
  136. EXTERN char_u      *p_dir;        /* list of directories for swap file */
  137. EXTERN int        p_ed;        /* :s is ed compatible */
  138. EXTERN int        p_ea;        /* make windows equal height */
  139. EXTERN char_u      *p_ep;        /* program name for '=' command */
  140. EXTERN int        p_eb;        /* ring bell for errors */
  141. EXTERN char_u  *p_ef;        /* name of errorfile */
  142. EXTERN char_u  *p_efm;        /* error format */
  143. EXTERN int        p_ek;        /* function keys with ESC in insert mode */
  144. EXTERN int        p_exrc;        /* read .exrc in current dir */
  145. EXTERN char_u  *p_fp;        /* name of format program */
  146. EXTERN int        p_gd;        /* /g is default for :s */
  147. #ifdef USE_GUI
  148. EXTERN char_u  *p_guifont;        /* GUI font list */
  149. EXTERN char_u  *p_guioptions;    /* Which GUI components? */
  150. EXTERN int        p_guipty;        /* use pseudo pty for external commands */
  151. #endif
  152. EXTERN char_u  *p_hf;        /* name of help file */
  153. EXTERN long     p_hh;        /* help window height */
  154. EXTERN int        p_hid;        /* buffers can be hidden */
  155. EXTERN char_u  *p_hl;        /* which highlight mode to use */
  156. EXTERN long     p_hi;        /* command line history size */
  157. #ifdef RIGHTLEFT
  158. EXTERN int        p_hkmap;    /* Hebrew keyboard map */
  159. #endif
  160. EXTERN int        p_icon;        /* put file name in icon if possible */
  161. EXTERN int        p_ic;        /* ignore case in searches */
  162. EXTERN int        p_is;        /* incremental search */
  163. EXTERN int        p_im;        /* start editing in input mode */
  164. EXTERN char_u  *p_inc;        /* Pattern for including other files */
  165. EXTERN char_u  *p_isf;        /* characters in a file name */
  166. EXTERN char_u  *p_isi;        /* characters in an identifier */
  167. EXTERN char_u  *p_isp;        /* characters that are printable */
  168. EXTERN int        p_js;        /* use two spaces after '.' with Join */
  169. EXTERN char_u  *p_kp;        /* keyword program */
  170. #ifdef HAVE_LANGMAP
  171. EXTERN char_u  *p_langmap;    /* mapping for some language */
  172. #endif
  173. EXTERN long        p_ls;        /* last window has status line */
  174. EXTERN int        p_magic;    /* use some characters for reg exp */
  175. EXTERN char_u  *p_mp;        /* program for :make command */
  176. EXTERN long     p_mmd;        /* maximal map depth */
  177. EXTERN long     p_mm;        /* maximal amount of memory for buffer */
  178. EXTERN long     p_mmt;        /* maximal amount of memory for Vim */
  179. EXTERN long     p_mls;        /* number of mode lines */
  180. EXTERN char_u  *p_mouse;    /* enable mouse clicks (for xterm) */
  181. EXTERN long        p_mouset;      /* mouse double click time */
  182. EXTERN int        p_more;        /* wait when screen full when listing */
  183. EXTERN char_u  *p_para;        /* paragraphs */
  184. EXTERN int        p_paste;    /* paste mode */
  185. EXTERN char_u  *p_pm;          /* patchmode file suffix */
  186. EXTERN char_u  *p_path;        /* path for "]f" and "^Wf" */
  187. EXTERN int        p_remap;    /* remap */
  188. EXTERN long        p_report;    /* minimum number of lines for report */
  189. #ifdef WIN32
  190. EXTERN int        p_rs;        /* restore startup screen upon exit */
  191. #endif
  192. #ifdef RIGHTLEFT
  193. EXTERN int        p_ri;        /* reverse direction of insert */
  194. #endif
  195. EXTERN int        p_ru;        /* show column/line number */
  196. EXTERN long        p_sj;        /* scroll jump size */
  197. EXTERN long        p_so;        /* scroll offset */
  198. EXTERN char_u  *p_sections;    /* sections */
  199. EXTERN int        p_secure;    /* do .exrc and .vimrc in secure mode */
  200. EXTERN char_u  *p_sh;        /* name of shell to use */
  201. EXTERN char_u  *p_sp;        /* string for output of make */
  202. EXTERN char_u  *p_srr;        /* string for output of filter */
  203. EXTERN long        p_st;        /* type of shell */
  204. EXTERN int        p_sr;        /* shift round off (for < and >) */
  205. EXTERN char_u  *p_shm;        /* When to use short message */
  206. EXTERN char_u  *p_sbr;        /* string for break of line */
  207. EXTERN int        p_sc;        /* show command in status line */
  208. EXTERN int        p_sm;        /* showmatch */
  209. EXTERN int        p_smd;        /* show mode */
  210. EXTERN long        p_ss;        /* sideways scrolling offset */
  211. EXTERN int        p_scs;        /* 'smartcase' */
  212. EXTERN int        p_sta;        /* smart-tab for expand-tab */
  213. EXTERN int        p_sb;        /* split window backwards */
  214. EXTERN int        p_sol;        /* Move cursor to start-of-line? */
  215. EXTERN char_u  *p_su;        /* suffixes for wildcard expansion */
  216. EXTERN char_u  *p_sws;        /* swap file syncing */
  217. EXTERN long     p_tl;        /* used tag length */
  218. EXTERN int        p_tr;        /* tag file name is relative */
  219. EXTERN char_u  *p_tags;        /* tags search path */
  220. EXTERN int        p_terse;    /* terse messages */
  221. EXTERN int        p_ta;        /* auto textmode detection */
  222. EXTERN int        p_to;        /* tilde is an operator */
  223. EXTERN int        p_timeout;    /* mappings entered within one second */
  224. EXTERN long     p_tm;        /* timeoutlen (msec) */
  225. EXTERN int        p_title;    /* set window title if possible */
  226. EXTERN int        p_ttimeout;    /* key codes entered within one second */
  227. EXTERN long     p_ttm;        /* key code timeoutlen (msec) */
  228. EXTERN int        p_tbi;        /* 'ttybuiltin' use builtin termcap first */
  229. EXTERN int        p_tf;        /* terminal fast I/O */
  230. EXTERN long        p_ttyscroll; /* maximum number of screen lines for a scroll */
  231. EXTERN long     p_ul;        /* number of Undo Levels */
  232. EXTERN long     p_uc;        /* update count for swap file */
  233. EXTERN long     p_ut;        /* update time for swap file */
  234. #ifdef VIMINFO
  235. EXTERN char_u  *p_viminfo;    /* Parameters for using ~/.viminfo file */
  236. #endif /* VIMINFO */
  237. EXTERN int        p_vb;        /* visual bell only (no beep) */
  238. EXTERN int        p_warn;        /* warn for changes at shell command */
  239. EXTERN int        p_wiv;        /* inversion of text is weird */
  240. EXTERN char_u  *p_ww;        /* which keys wrap to next/prev line */
  241. EXTERN long        p_wc;        /* character for wildcard exapansion */
  242. EXTERN long        p_wh;        /* desired window height */
  243. EXTERN int        p_ws;        /* wrap scan */
  244. EXTERN int        p_wa;        /* write any */
  245. EXTERN int        p_wb;        /* write backup files */
  246. EXTERN long        p_wd;        /* write delay for screen output (for testing) */
  247.